<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class admins extends MX_Controller
{
	function admins()
	{
		parent::__construct();
		$this->load->model('mod_lib');
	}
	
	function index()
	{
		$data['title']			= 'Quản Lý Administrator';
		$data['admin_group']	= $this->db->get_where('admin_groups', array())->result_array();
		$this->load->library('pagination');
		$per_page 				= 30;		
		$total 	  				= $this->mod_lib->count('admins', array());
		$data['admin_admin']	= $this->mod_lib->load_all('admins', '', array(), $per_page, $this->uri->segment(4), array("id"=>"ASC"));
		$base_url				= site_url('admin_admin/admin_admin/index/');		
		$config['base_url']		= $base_url;
		$config['per_page']		= $per_page;
		$config['total_rows']	= $total;		
		$config['uri_segment']	= 4;
		$data['rs']				= $this->uri->segment(4);	
		$this->pagination->initialize($config);		
		$data['paging']			= $this->pagination->create_links();
		$data['content_admin']	= 'admin_admin/index';
		$this->load->view('back_end/template_admin', $data);			
	}
}